1. Field of the Invention
The present invention relates to an image capturing apparatus and a control method for the same, and in particular to an image capturing apparatus that performs autofocus control and a control method for the same.
2. Description of the Related Art
With autofocus (AF) control in video cameras and the like, a TV-AF system is widely used in which an in-focus position is detected based on the sharpness (contrast) of an image signal generated by using an image sensor. Specifically, for an image signal obtained by sequentially capturing images while moving a focusing lens, AF evaluation values indicating contrast levels are generated, and based on the AF evaluation values, a search is performed to find the focusing lens position at which the contrast is the highest, as the in-focus position.
However, when capturing an image of a person, there are cases in which the focus is put on the background, not the person who is the main subject, due to the relationship of the contrast of the person and the background.
In order to solve such a problem, an image capturing apparatus is known in which a person is detected and a focusing area is set so that the focus is put on the person. For example, there has been proposed an image capturing apparatus that includes a face detection function and performs focusing with respect to a focusing area that includes a detected face region (e.g., see Japanese Patent Laid-Open No. 2006-227080), and an image capturing apparatus that detects a person's eyes and performs focusing based on the eyes (e.g., see Japanese Patent Laid-Open No. 2001-215403).
However, although the focus is put on a detected face in focusing that uses the conventional face detection functions described above, a face cannot always be detected due to various factors. Also, in the exemplary case of performing focusing in which a single detected face region is set as the focusing area, it is possible for the focusing area to constantly change according to the face detection result. Also, if a predetermined focusing area (e.g., at the screen center) is used when a face cannot be detected, there are cases in which faces are detected sometimes and not detected at other times, as a result of which the focusing area changes frequently and focusing stability falls.
Another example of an inability to detect a face includes the case in which the main subject, who is the target of face detection, exists in the angle of view, but the main subject's face temporarily cannot be detected, such as when the main subject is turned to the side or the main subject's eyes are closed, as well as when the main subject is temporarily blocked by another subject.
In this way, when using a configuration in which a fixed focusing area is set when a face cannot be detected regardless of the fact that this is due to a temporary factor, the focusing area is changed to the fixed focusing area if the main subject does not exist in the screen center, as a result of which the captured image is out of focus with respect to the intended subject.